﻿namespace Leetcode.N0961;
public class Solution
{
    public int RepeatedNTimes(int[] nums)
    {
        var hashset = new HashSet<int>();
        foreach (var item in nums)
        {
            if (!hashset.Add(item))
            {
                return item;
            }
        }
        return 0;
    }
}